

const Service=require("egg").Service

// 继承
class UserService extends Service{
    // 获取列表
    async listService(){
        const sql=`SELECT * FROM user_list`
        return await this.app.mysql.query(sql)
    }
    //登录
    async loginService(username,pwd){
        const sql=`select * from login where username=? and pwd=?`
        return await this.app.mysql.query(sql,[username,pwd])
    }
}

module.exports=UserService